
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type StoreVisitRequest struct {

	ProductId string `json:"product_id" form:"product_id"`

	ProductType string `json:"product_type" form:"product_type"`

	CateId string `json:"cate_id" form:"cate_id"`

	Type string `json:"type" form:"type"`

	Uid string `json:"uid" form:"uid"`

	Count string `json:"count" form:"count"`

	Content string `json:"content" form:"content"`

	AddTime string `json:"add_time" form:"add_time"`

}

func (r *StoreVisitRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *StoreVisitRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"product_id": "required",

		"product_type": "required",

		"cate_id": "required",

		"type": "required",

		"uid": "required",

		"count": "required",

		"content": "required",

		"add_time": "required",

	}
}

func (r *StoreVisitRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreVisitRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreVisitRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
